%.o:%.c
	gcc -c $<

libcal.so:add.o sub.o
	gcc -shared -o $@ $^
%.o:%.c
	gcc -c -fPIC $<
#add.o:add.c
#	gcc -c -fPIC $<
#sub.o:sub.c
#	gcc -c -fPIC $<

.PHONY:clean
clean:
	rm -rf *.o libcal.so mylib mylib.tgz

.PHONY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib
	cp -rf *.h mylib/include
	cp -rf *.so mylib/lib
	tar czf mylib.tgz mylib
